import { info } from "./url";

async function history(userId) {
  return uni.request(`${info.url}/user/history`, { userId }, "GET");
}

async function changeInfo(userId, sex, weight, birth, height) {
  return uni.request(`${info.url}/user/info`, { userId, sex, weight, birth, height }, "PUT");
}

async function setUser() {

}

async function getInfo(userId) {
  return uni.request(`${info.url}/user/info`, { userId }, "GET");
}

async function feedback(userId, content) {
  return uni.request(`${info.url}/user/feedback`, { userId, content }, "POST");
}

export default { history, changeInfo, setUser, getInfo, feedback };